﻿using System;
using System.Linq;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Web;

namespace WebComponents
{
    public static class SiteConfiguration
    {
        public static string ConnectionString { get; set; }
        public static string RssDefaultTime { get; set; }
        public static string RssTimeDir { get; set; }
        public static string SiteUrl { get; set; }
        //ACTPageSettings
        public static string PageTitle { get; set; }
        public static string PageMenuParent { get; set; }
        public static string PageMenuChild { get; set; }
        //ACT Images
        public static string EnumACTIconWebApp24Image(this EnumACTIconWebApp24 icon)
        {
            string fileName = "";
            switch (icon)
            {
                case EnumACTIconWebApp24.BarChart:
                    fileName = "Bar-Chart";
                    break;
                case EnumACTIconWebApp24.LineChart:
                    fileName = "Line-Chart";
                    break;
                case EnumACTIconWebApp24.PieChart:
                    fileName = "Pie-Chart";
                    break;
                default:
                    fileName = icon.ToString();
                    break;
            }
            return String.Format("<img src='{0}WebComponents/ACT/images/icons/web-app/24/{1}.png' width='24' height='24'>", SiteConfiguration.SiteUrl, fileName);
        }

        public static string EnumACTIconFugueImage(this EnumACTIconFugue icon)
        {
            string fileName = "";
            switch (icon)
            {
                case EnumACTIconFugue.AddressBook:
                    fileName = "address-book.png";
                    break;
                case EnumACTIconFugue.AlarmClockBlue:
                    fileName = "alarm-clock-blue.png";
                    break;
                case EnumACTIconFugue.ApplicationBlog:
                    fileName = "application-blog.png";
                    break;
                case EnumACTIconFugue.ApplicationExport:
                    fileName = "application-export.png";
                    break;
                case EnumACTIconFugue.ApplicationMonitor:
                    fileName = "application-monitor.png";
                    break;
                case EnumACTIconFugue.ApplicationTable:
                    fileName = "application-table.png";
                    break;
                case EnumACTIconFugue.ApplicationTerminal:
                    fileName = "application-terminal.png";
                    break;
                case EnumACTIconFugue.Arrow090:
                    fileName = "arrow-090.png";
                    break;
                case EnumACTIconFugue.Arrow270:
                    fileName = "arrow-270.png";
                    break;
                case EnumACTIconFugue.ArrowCircle:
                    fileName = "arrow-circle.png";
                    break;
                case EnumACTIconFugue.ArrowCurve000Left:
                    fileName = "arrow-curve-000-left.png";
                    break;
                case EnumACTIconFugue.ArrowCurve090Red:
                    fileName = "arrow-curve-090-red.png";
                    break;
                case EnumACTIconFugue.ArrowCurve090:
                    fileName = "arrow-curve-090.png";
                    break;
                case EnumACTIconFugue.Arrowcircle:
                    fileName = "ArrowCircle.png";
                    break;
                case EnumACTIconFugue.BalloonReverse:
                    fileName = "balloon-reverse.png";
                    break;
                case EnumACTIconFugue.Balloon:
                    fileName = "balloon.png";
                    break;
                case EnumACTIconFugue.BatteryFull:
                    fileName = "battery-full.png";
                    break;
                case EnumACTIconFugue.Building:
                    fileName = "building.png";
                    break;
                case EnumACTIconFugue.CalendarDay:
                    fileName = "calendar-day.png";
                    break;
                case EnumACTIconFugue.CalendarMonth:
                    fileName = "calendar-month.png";
                    break;
                case EnumACTIconFugue.CardsAddress:
                    fileName = "cards-address.png";
                    break;
                case EnumACTIconFugue.Chart:
                    fileName = "chart.png";
                    break;
                case EnumACTIconFugue.ChevronExpandOff:
                    fileName = "chevron-expand-off.png";
                    break;
                case EnumACTIconFugue.ChevronExpand:
                    fileName = "chevron-expand.png";
                    break;
                case EnumACTIconFugue.ChevronOff:
                    fileName = "chevron-off.png";
                    break;
                case EnumACTIconFugue.ChevronSmallExpandOff:
                    fileName = "chevron-small-expand-off.png";
                    break;
                case EnumACTIconFugue.ChevronSmallExpand:
                    fileName = "chevron-small-expand.png";
                    break;
                case EnumACTIconFugue.ChevronSmallOff:
                    fileName = "chevron-small-off.png";
                    break;
                case EnumACTIconFugue.ChevronSmall:
                    fileName = "chevron-small.png";
                    break;
                case EnumACTIconFugue.Chevron:
                    fileName = "chevron.png";
                    break;
                case EnumACTIconFugue.Clock:
                    fileName = "clock.png";
                    break;
                case EnumACTIconFugue.Computer:
                    fileName = "computer.png";
                    break;
                case EnumACTIconFugue.Control000Small:
                    fileName = "control-000-small.png";
                    break;
                case EnumACTIconFugue.Control180:
                    fileName = "control-180.png";
                    break;
                case EnumACTIconFugue.ControlDouble180:
                    fileName = "control-double-180.png";
                    break;
                case EnumACTIconFugue.ControlDouble:
                    fileName = "control-double.png";
                    break;
                case EnumACTIconFugue.ControlEject:
                    fileName = "control-eject.png";
                    break;
                case EnumACTIconFugue.ControlPause:
                    fileName = "control-pause.png";
                    break;
                case EnumACTIconFugue.ControlPower:
                    fileName = "control-power.png";
                    break;
                case EnumACTIconFugue.ControlSkip180:
                    fileName = "control-skip-180.png";
                    break;
                case EnumACTIconFugue.ControlSkip:
                    fileName = "control-skip.png";
                    break;
                case EnumACTIconFugue.ControlStopSquare:
                    fileName = "control-stop-square.png";
                    break;
                case EnumACTIconFugue.Control:
                    fileName = "control.png";
                    break;
                case EnumACTIconFugue.CounterReset:
                    fileName = "counter-reset.png";
                    break;
                case EnumACTIconFugue.CrossCircle:
                    fileName = "cross-circle.png";
                    break;
                case EnumACTIconFugue.CrossSmall:
                    fileName = "cross-small.png";
                    break;
                case EnumACTIconFugue.Crosscircle:
                    fileName = "CrossCircle.png";
                    break;
                case EnumACTIconFugue.Database:
                    fileName = "database.png";
                    break;
                case EnumACTIconFugue.DocumentAccess:
                    fileName = "document-access.png";
                    break;
                case EnumACTIconFugue.DocumentBinary:
                    fileName = "document-binary.png";
                    break;
                case EnumACTIconFugue.DocumentBookmark:
                    fileName = "document-bookmark.png";
                    break;
                case EnumACTIconFugue.DocumentCode:
                    fileName = "document-code.png";
                    break;
                case EnumACTIconFugue.DocumentExcelCsv:
                    fileName = "document-excel-csv.png";
                    break;
                case EnumACTIconFugue.DocumentExcel:
                    fileName = "document-excel.png";
                    break;
                case EnumACTIconFugue.DocumentFilm:
                    fileName = "document-film.png";
                    break;
                case EnumACTIconFugue.DocumentFlashMovie:
                    fileName = "document-flash-movie.png";
                    break;
                case EnumACTIconFugue.DocumentGlobe:
                    fileName = "document-globe.png";
                    break;
                case EnumACTIconFugue.DocumentIllustrator:
                    fileName = "document-illustrator.png";
                    break;
                case EnumACTIconFugue.DocumentImage:
                    fileName = "document-image.png";
                    break;
                case EnumACTIconFugue.DocumentMusic:
                    fileName = "document-music.png";
                    break;
                case EnumACTIconFugue.DocumentOffice:
                    fileName = "document-office.png";
                    break;
                case EnumACTIconFugue.DocumentPdf:
                    fileName = "document-pdf.png";
                    break;
                case EnumACTIconFugue.DocumentPhotoshop:
                    fileName = "document-photoshop.png";
                    break;
                case EnumACTIconFugue.DocumentPowerpoint:
                    fileName = "document-powerpoint.png";
                    break;
                case EnumACTIconFugue.DocumentSmall:
                    fileName = "document-small.png";
                    break;
                case EnumACTIconFugue.DocumentText:
                    fileName = "document-text.png";
                    break;
                case EnumACTIconFugue.DocumentWord:
                    fileName = "document-word.png";
                    break;
                case EnumACTIconFugue.DocumentZipper:
                    fileName = "document-zipper.png";
                    break;
                case EnumACTIconFugue.Document:
                    fileName = "document.png";
                    break;
                case EnumACTIconFugue.ExclamationDiamond:
                    fileName = "exclamation-diamond.png";
                    break;
                case EnumACTIconFugue.Film:
                    fileName = "film.png";
                    break;
                case EnumACTIconFugue.Flag:
                    fileName = "flag.png";
                    break;
                case EnumACTIconFugue.FolderBookmark:
                    fileName = "folder-bookmark.png";
                    break;
                case EnumACTIconFugue.FolderOpenDocumentMusic:
                    fileName = "folder-open-document-music.png";
                    break;
                case EnumACTIconFugue.FolderOpenDocumentText:
                    fileName = "folder-open-document-text.png";
                    break;
                case EnumACTIconFugue.FolderOpenDocument:
                    fileName = "folder-open-document.png";
                    break;
                case EnumACTIconFugue.FolderOpenFilm:
                    fileName = "folder-open-film.png";
                    break;
                case EnumACTIconFugue.FolderOpenImage:
                    fileName = "folder-open-image.png";
                    break;
                case EnumACTIconFugue.FolderOpenTable:
                    fileName = "folder-open-table.png";
                    break;
                case EnumACTIconFugue.FolderOpen:
                    fileName = "folder-open.png";
                    break;
                case EnumACTIconFugue.FolderZipper:
                    fileName = "folder-zipper.png";
                    break;
                case EnumACTIconFugue.Folder:
                    fileName = "folder.png";
                    break;
                case EnumACTIconFugue.GlobeNetwork:
                    fileName = "globe-network.png";
                    break;
                case EnumACTIconFugue.HardHat:
                    fileName = "hard-hat.png";
                    break;
                case EnumACTIconFugue.Home:
                    fileName = "home.png";
                    break;
                case EnumACTIconFugue.Image:
                    fileName = "image.png";
                    break;
                case EnumACTIconFugue.Images:
                    fileName = "images.png";
                    break;
                case EnumACTIconFugue.InformationBlue:
                    fileName = "information-blue.png";
                    break;
                case EnumACTIconFugue.InformationOcre:
                    fileName = "information-ocre.png";
                    break;
                case EnumACTIconFugue.Magnifier:
                    fileName = "magnifier.png";
                    break;
                case EnumACTIconFugue.Mail:
                    fileName = "mail.png";
                    break;
                case EnumACTIconFugue.Monitor:
                    fileName = "monitor.png";
                    break;
                case EnumACTIconFugue.Navigation000White:
                    fileName = "navigation-000-white.png";
                    break;
                case EnumACTIconFugue.Navigation090White:
                    fileName = "navigation-090-white.png";
                    break;
                case EnumACTIconFugue.Navigation090:
                    fileName = "navigation-090.png";
                    break;
                case EnumACTIconFugue.Navigation180White:
                    fileName = "navigation-180-white.png";
                    break;
                case EnumACTIconFugue.Navigation180:
                    fileName = "navigation-180.png";
                    break;
                case EnumACTIconFugue.Navigation270White:
                    fileName = "navigation-270-white.png";
                    break;
                case EnumACTIconFugue.Navigation270:
                    fileName = "navigation-270.png";
                    break;
                case EnumACTIconFugue.Navigation:
                    fileName = "navigation.png";
                    break;
                case EnumACTIconFugue.Newspaper:
                    fileName = "newspaper.png";
                    break;
                case EnumACTIconFugue.Pencil:
                    fileName = "pencil.png";
                    break;
                case EnumACTIconFugue.PinSmall:
                    fileName = "pin-small.png";
                    break;
                case EnumACTIconFugue.PlusCircleBlue:
                    fileName = "plus-circle-blue.png";
                    break;
                case EnumACTIconFugue.PlusCircle:
                    fileName = "plus-circle.png";
                    break;
                case EnumACTIconFugue.QuestionWhite:
                    fileName = "question-white.png";
                    break;
                case EnumACTIconFugue.Server:
                    fileName = "server.png";
                    break;
                case EnumACTIconFugue.StarEmpty:
                    fileName = "star-empty.png";
                    break;
                case EnumACTIconFugue.StarHalf:
                    fileName = "star-half.png";
                    break;
                case EnumACTIconFugue.Star:
                    fileName = "star.png";
                    break;
                case EnumACTIconFugue.StatusAway:
                    fileName = "status-away.png";
                    break;
                case EnumACTIconFugue.StatusBusy:
                    fileName = "status-busy.png";
                    break;
                case EnumACTIconFugue.StatusOffline:
                    fileName = "status-offline.png";
                    break;
                case EnumACTIconFugue.Status:
                    fileName = "status.png";
                    break;
                case EnumACTIconFugue.TagSmall:
                    fileName = "tag-small.png";
                    break;
                case EnumACTIconFugue.TagsLabel:
                    fileName = "tags-label.png";
                    break;
                case EnumACTIconFugue.TickCircleBlue:
                    fileName = "tick-circle-blue.png";
                    break;
                case EnumACTIconFugue.TickCircle:
                    fileName = "tick-circle.png";
                    break;
                case EnumACTIconFugue.UserBlackFemale:
                    fileName = "user-black-female.png";
                    break;
                case EnumACTIconFugue.UserBlack:
                    fileName = "user-black.png";
                    break;
                case EnumACTIconFugue.UserBusinessBoss:
                    fileName = "user-business-boss.png";
                    break;
                case EnumACTIconFugue.UserBusinessGrayBoss:
                    fileName = "user-business-gray-boss.png";
                    break;
                case EnumACTIconFugue.UserBusinessGray:
                    fileName = "user-business-gray.png";
                    break;
                case EnumACTIconFugue.UserBusiness:
                    fileName = "user-business.png";
                    break;
                case EnumACTIconFugue.UserDetectiveGray:
                    fileName = "user-detective-gray.png";
                    break;
                case EnumACTIconFugue.UserDetective:
                    fileName = "user-detective.png";
                    break;
                case EnumACTIconFugue.UserFemale:
                    fileName = "user-female.png";
                    break;
                case EnumACTIconFugue.UserGrayFemale:
                    fileName = "user-gray-female.png";
                    break;
                case EnumACTIconFugue.UserGray:
                    fileName = "user-gray.png";
                    break;
                case EnumACTIconFugue.UserGreenFemale:
                    fileName = "user-green-female.png";
                    break;
                case EnumACTIconFugue.UserGreen:
                    fileName = "user-green.png";
                    break;
                case EnumACTIconFugue.UserNudeFemale:
                    fileName = "user-nude-female.png";
                    break;
                case EnumACTIconFugue.UserNude:
                    fileName = "user-nude.png";
                    break;
                case EnumACTIconFugue.UserRedFemale:
                    fileName = "user-red-female.png";
                    break;
                case EnumACTIconFugue.UserRed:
                    fileName = "user-red.png";
                    break;
                case EnumACTIconFugue.UserSilhouetteQuestion:
                    fileName = "user-silhouette-question.png";
                    break;
                case EnumACTIconFugue.UserSilhouette:
                    fileName = "user-silhouette.png";
                    break;
                case EnumACTIconFugue.UserThiefBaldie:
                    fileName = "user-thief-baldie.png";
                    break;
                case EnumACTIconFugue.UserThiefFemale:
                    fileName = "user-thief-female.png";
                    break;
                case EnumACTIconFugue.UserThief:
                    fileName = "user-thief.png";
                    break;
                case EnumACTIconFugue.UserWhiteFemale:
                    fileName = "user-white-female.png";
                    break;
                case EnumACTIconFugue.UserWhite:
                    fileName = "user-white.png";
                    break;
                case EnumACTIconFugue.UserYellowFemale:
                    fileName = "user-yellow-female.png";
                    break;
                case EnumACTIconFugue.UserYellow:
                    fileName = "user-yellow.png";
                    break;
                case EnumACTIconFugue.User:
                    fileName = "user.png";
                    break;
                case EnumACTIconFugue.Users:
                    fileName = "users.png";
                    break;
                default:
                    fileName = icon.ToString();
                    break;
            }
            return String.Format("<img src='{0}WebComponents/ACT/images/icons/fugue/{1}' width='16' height='16'>", SiteConfiguration.SiteUrl, fileName);
        }



        #region Public Functions
        public static string GetFullPath(this string folderPath)
        {
            if (!folderPath.StartsWith("~/"))
            {
                if (folderPath.StartsWith("/"))
                    folderPath = "~" + folderPath;
                else
                    folderPath = "~/" + folderPath;
            }

            string path = HttpContext.Current.Server.MapPath(folderPath);

            return path;
        }
        #endregion


    }


}
